package 结业考试;

import java.util.Scanner;

public class IntSumAndRules {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入第一个整数：");
        int r1 = scanner.nextInt();
        System.out.println("请输入第二个整数：");
        int r2 = scanner.nextInt();


        int sum = r1 + r2;
        int difference = r1 - r2;
        System.out.println("它们的和为：" + sum);
        System.out.println("它们的差为：" + difference);
    }

}
//求两个整数的和差